/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Formas;

import Formas.Maquinas.FormLil;
import datos.*;
import java.awt.Image;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import Formas.FormatoTablastatuscomisiones;
import java.awt.event.ItemEvent;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.swing.*;
import javax.swing.table.*;

/**
 *
 * @author lupiss
 */
public class InterMaquinas extends javax.swing.JInternalFrame {

    private ControllerMaquina cc1;
    public tratadatos objDatos = new tratadatos();
    private BDAdmin objCon = new BDAdmin();
    //private general obj=new general(ServerBridge.setuniclaveDes(""));
    private FileInputStream fis;
    private int longitudBytes;
    

    /**
     * Creates new form InterMaquinas
     */
    public InterMaquinas() {
        initComponents();
        cc1 = new ControllerMaquina();
        jTm_uniclave.setText("AM_" + objDatos.getCadenaAlfanumAleatoria(8));
        lb_foto.setIcon(new CustomImageIcon(getClass().getResource("/resource/defaultlarge.gif")));
        jFm_fechaingreso.setText(ServerBridge.getfechasistemacompleta());
        llenarCombomaquinas();
        llenarCombomaquinasFiltroLIL();
        jTableLILDesglose.setFont(new java.awt.Font("Tahoma", 0, 10)); 
        JTableHeader th1 = jTableLILDesglose.getTableHeader();
        th1.setFont(new java.awt.Font("Tahoma", 0, 10));
        cargaDefaultEnca();
        //jC_maquinas.setSelectedIndex(-1);
             
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        lb_foto = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jTm_nombre = new javax.swing.JTextField();
        jTm_marca = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jTm_serie = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jTm_modelo = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jCm_ubicacion = new javax.swing.JComboBox();
        jLabel8 = new javax.swing.JLabel();
        jFm_fechaingreso = new javax.swing.JFormattedTextField();
        jLabel9 = new javax.swing.JLabel();
        jTm_uniclave = new javax.swing.JTextField();
        jB_exit = new javax.swing.JButton();
        jB_save = new javax.swing.JButton();
        jB_clean = new javax.swing.JButton();
        jB_delete = new javax.swing.JButton();
        jB_update = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jLabel10 = new javax.swing.JLabel();
        jC_maquinas = new javax.swing.JComboBox();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel4 = new javax.swing.JPanel();
        jPanel15 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable_puntos = new javax.swing.JTable();
        jLabel12 = new javax.swing.JLabel();
        jC_categoria = new javax.swing.JComboBox();
        jLabel13 = new javax.swing.JLabel();
        jC_prioridad = new javax.swing.JComboBox();
        jLabel14 = new javax.swing.JLabel();
        jC_frecuencia = new javax.swing.JComboBox();
        jButton2 = new javax.swing.JButton();
        jButton12 = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        jPanel14 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jC_filtrolil = new javax.swing.JComboBox();
        jLabel11 = new javax.swing.JLabel();
        jC_maquinasfiltro = new javax.swing.JComboBox();
        jPanel21 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jTableLILDesglose = new javax.swing.JTable();
        jButton6 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        jLabel18 = new javax.swing.JLabel();
        jComboLIL_MES = new javax.swing.JComboBox();
        jLabel19 = new javax.swing.JLabel();
        jCombo_LILAÑO = new javax.swing.JComboBox();
        jPanel3 = new javax.swing.JPanel();
        jPanel13 = new javax.swing.JPanel();
        jButton3 = new javax.swing.JButton();
        jC_valLups = new javax.swing.JComboBox();
        jPanel16 = new javax.swing.JPanel();
        jLabel15 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jT_archivos = new javax.swing.JTable();
        jB_abrelup = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        jPanel6 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jPanel17 = new javax.swing.JPanel();
        jB_nuevoMS = new javax.swing.JButton();
        jPanel18 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jT_archivosMapas = new javax.swing.JTable();
        jButton7 = new javax.swing.JButton();
        jButton8 = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jPanel19 = new javax.swing.JPanel();
        jB_nuevoML = new javax.swing.JButton();
        jPanel20 = new javax.swing.JPanel();
        jLabel17 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jT_archivosML = new javax.swing.JTable();
        jButton10 = new javax.swing.JButton();
        jButton11 = new javax.swing.JButton();
        jPanel10 = new javax.swing.JPanel();
        jPanel11 = new javax.swing.JPanel();
        jPanel12 = new javax.swing.JPanel();

        setTitle("AMService_Maquinas");

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));

        lb_foto.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lb_foto.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lb_fotoMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lb_foto, javax.swing.GroupLayout.PREFERRED_SIZE, 394, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(19, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lb_foto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel2.setText("DATOS GENERALES AMService_MAQUINAS");

        jLabel3.setText("Maquina o Equipo:");

        jLabel4.setText("Marca:");

        jLabel5.setText("No. Serie:");

        jLabel6.setText("Modelo:");

        jLabel7.setText("Ubicación:");

        jCm_ubicacion.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Sala de Corte de Pavo", "Pulpeo de Cerdo", "Logistica", "Cámara 1", "Cámara 2", "Cámara 3", "Cámara 4", "Congelador 5", "Congelador 6", "Cámara 7", "Congelador 8", "Congelador 9", "Congelador 10", "Cámara 11", "Cámara 12" }));

        jLabel8.setText("Fecha ingreso:");

        try {
            jFm_fechaingreso.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        jFm_fechaingreso.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel9.setText("UNICLAVE:");

        jTm_uniclave.setEditable(false);
        jTm_uniclave.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jB_exit.setText("Salir");
        jB_exit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_exitActionPerformed(evt);
            }
        });

        jB_save.setText("Agregar");
        jB_save.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_saveActionPerformed(evt);
            }
        });

        jB_clean.setText("Limpiar");

        jB_delete.setText("Eliminar");
        jB_delete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_deleteActionPerformed(evt);
            }
        });

        jB_update.setText("Modificar");
        jB_update.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_updateActionPerformed(evt);
            }
        });

        jButton1.setText("Agregar Punto de Inspección");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jLabel10.setText("Maquinas:");

        jC_maquinas.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jC_maquinas.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jC_maquinasItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel4)
                            .addComponent(jLabel3)
                            .addComponent(jLabel5)
                            .addComponent(jLabel6)
                            .addComponent(jLabel7)
                            .addComponent(jLabel8))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jTm_nombre)
                                    .addComponent(jTm_marca)
                                    .addComponent(jTm_serie)
                                    .addComponent(jTm_modelo)
                                    .addComponent(jCm_ubicacion, 0, 273, Short.MAX_VALUE))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel2Layout.createSequentialGroup()
                                        .addComponent(jLabel9)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jTm_uniclave, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                        .addComponent(jB_clean, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jB_delete, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jB_update, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE))))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jFm_fechaingreso, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jB_save, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 436, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jB_exit))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jC_maquinas, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jB_exit))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jTm_nombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9)
                    .addComponent(jTm_uniclave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(jTm_marca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jB_update))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTm_serie, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5)
                    .addComponent(jB_delete))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(jTm_modelo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jB_clean))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCm_ubicacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(jFm_fechaingreso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jB_save))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(jButton1)
                    .addComponent(jC_maquinas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
        jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

        jTable_puntos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Componente", "Run / Stop", "Punto", "Estandar de Inspección", "Método", "Herramientas", "Acción en caso de Anormalidad", "Tiempo (min)", "Frecuencia", "Prioridad", "Maquina"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTable_puntos.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jTable_puntos.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable_puntosMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(jTable_puntos);
        jTable_puntos.getColumnModel().getColumn(0).setMinWidth(200);
        jTable_puntos.getColumnModel().getColumn(0).setMaxWidth(200);
        jTable_puntos.getColumnModel().getColumn(1).setMinWidth(70);
        jTable_puntos.getColumnModel().getColumn(1).setMaxWidth(70);
        jTable_puntos.getColumnModel().getColumn(2).setMinWidth(60);
        jTable_puntos.getColumnModel().getColumn(2).setMaxWidth(60);
        jTable_puntos.getColumnModel().getColumn(3).setMinWidth(300);
        jTable_puntos.getColumnModel().getColumn(3).setMaxWidth(300);
        jTable_puntos.getColumnModel().getColumn(4).setMinWidth(200);
        jTable_puntos.getColumnModel().getColumn(4).setMaxWidth(200);
        jTable_puntos.getColumnModel().getColumn(5).setMinWidth(200);
        jTable_puntos.getColumnModel().getColumn(5).setMaxWidth(200);
        jTable_puntos.getColumnModel().getColumn(6).setMinWidth(300);
        jTable_puntos.getColumnModel().getColumn(6).setMaxWidth(300);
        jTable_puntos.getColumnModel().getColumn(7).setMinWidth(90);
        jTable_puntos.getColumnModel().getColumn(7).setMaxWidth(90);
        jTable_puntos.getColumnModel().getColumn(8).setMinWidth(80);
        jTable_puntos.getColumnModel().getColumn(8).setMaxWidth(80);
        jTable_puntos.getColumnModel().getColumn(9).setMinWidth(80);
        jTable_puntos.getColumnModel().getColumn(9).setMaxWidth(80);
        jTable_puntos.getColumnModel().getColumn(10).setMinWidth(250);
        jTable_puntos.getColumnModel().getColumn(10).setMaxWidth(250);

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1008, Short.MAX_VALUE)
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)
        );

        jLabel12.setText("Categorias:");

        jC_categoria.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Sistema Neumatico", "Transmisión Mecanica", "Energia Electrica", "Hidraulica", "General" }));
        jC_categoria.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jC_categoriaItemStateChanged(evt);
            }
        });

        jLabel13.setText("Prioridad:");

        jC_prioridad.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Alta", "Media", "Baja" }));
        jC_prioridad.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jC_prioridadItemStateChanged(evt);
            }
        });

        jLabel14.setText("Frecuencia:");

        jC_frecuencia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "D = Diario", "S = Semanal", "Q = Quincenal", "M = Mensual", "B = Bimestral", "T = Trimestral", "Se = Semestral", "A = Anual" }));
        jC_frecuencia.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jC_frecuenciaItemStateChanged(evt);
            }
        });

        jButton2.setText("Agregar Punto a Componente");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jButton12.setText("Imprimir Filtros");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jC_categoria, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jC_frecuencia, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jC_prioridad, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(jC_categoria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14)
                    .addComponent(jC_frecuencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13)
                    .addComponent(jC_prioridad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton2)
                    .addComponent(jButton12))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(124, 124, 124))
        );

        jTabbedPane1.addTab("LIL", jPanel4);

        jPanel14.setBackground(new java.awt.Color(255, 255, 255));

        jLabel1.setText("FILTRO LIL:");

        jC_filtrolil.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel11.setText("Maquina Filtro LIL:");

        jC_maquinasfiltro.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jC_maquinasfiltro.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jC_maquinasfiltroItemStateChanged(evt);
            }
        });

        jScrollPane5.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
        jScrollPane5.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

        jTableLILDesglose.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "NOMBRE", "PRIORIDAD", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTableLILDesglose.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jScrollPane5.setViewportView(jTableLILDesglose);
        jTableLILDesglose.getColumnModel().getColumn(0).setMinWidth(150);
        jTableLILDesglose.getColumnModel().getColumn(0).setMaxWidth(150);
        jTableLILDesglose.getColumnModel().getColumn(1).setMinWidth(70);
        jTableLILDesglose.getColumnModel().getColumn(1).setMaxWidth(70);
        jTableLILDesglose.getColumnModel().getColumn(2).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(2).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(3).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(3).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(4).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(4).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(5).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(5).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(6).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(6).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(7).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(7).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(8).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(8).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(9).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(9).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(10).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(10).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(11).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(11).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(12).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(12).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(13).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(13).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(14).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(14).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(15).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(15).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(16).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(16).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(17).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(17).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(18).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(18).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(19).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(19).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(20).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(20).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(21).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(21).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(22).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(22).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(23).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(23).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(24).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(24).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(25).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(25).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(26).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(26).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(27).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(27).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(28).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(28).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(29).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(29).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(30).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(30).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(31).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(31).setMaxWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(32).setMinWidth(45);
        jTableLILDesglose.getColumnModel().getColumn(32).setMaxWidth(45);

        javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);
        jPanel21.setLayout(jPanel21Layout);
        jPanel21Layout.setHorizontalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 988, Short.MAX_VALUE)
        );
        jPanel21Layout.setVerticalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
        );

        jButton6.setText("Siguiente --->");
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });

        jButton9.setText("<--- Anterior");
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });

        jLabel18.setText("MES:");

        jComboLIL_MES.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Juilo", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre" }));

        jLabel19.setText("AÑO:");

        jCombo_LILAÑO.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020" }));

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jLabel11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jC_maquinasfiltro, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jC_filtrolil, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel18)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jComboLIL_MES, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel19)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jCombo_LILAÑO, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jButton9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton6))
                    .addComponent(jPanel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(jC_maquinasfiltro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1)
                    .addComponent(jC_filtrolil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton6)
                    .addComponent(jButton9)
                    .addComponent(jLabel18)
                    .addComponent(jComboLIL_MES, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel19)
                    .addComponent(jCombo_LILAÑO, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Cronograma de Mantenimiento", jPanel5);

        jPanel13.setBackground(new java.awt.Color(255, 255, 255));

        jButton3.setText("Nueva LUP");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jC_valLups.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Lups AMS Conocimieto General", "Lups AMS Descriptivo", "Lups AMS Saber por que", "Lups AMS Solución de problemas" }));

        jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel15.setText("LUP´S EXISTENTES");

        jT_archivos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Nombre "
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane2.setViewportView(jT_archivos);

        jB_abrelup.setText("Abrir LUP");
        jB_abrelup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_abrelupActionPerformed(evt);
            }
        });

        jButton5.setText("Cargar");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 359, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()
                        .addComponent(jButton5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jB_abrelup)))
                .addContainerGap())
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel15)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jB_abrelup)
                    .addComponent(jButton5))
                .addGap(55, 55, 55))
        );

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addComponent(jC_valLups, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(276, Short.MAX_VALUE))
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jC_valLups, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jButton3)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("LUP'S", jPanel3);

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1028, Short.MAX_VALUE)
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 251, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Pdo. Mantenimiento", jPanel6);

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1028, Short.MAX_VALUE)
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 251, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Anormalidades", jPanel7);

        jPanel17.setBackground(new java.awt.Color(255, 255, 255));

        jB_nuevoMS.setText("Nuevo MS");
        jB_nuevoMS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_nuevoMSActionPerformed(evt);
            }
        });

        jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel16.setText("Mapas de Seguridad Existentes");

        jT_archivosMapas.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Nombre"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane3.setViewportView(jT_archivosMapas);

        jButton7.setText("Abrir MS");

        jButton8.setText("Cargar");
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 293, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel18Layout.createSequentialGroup()
                                .addComponent(jButton8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 5, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel16)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton7)
                    .addComponent(jButton8))
                .addGap(8, 8, 8))
        );

        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
        jPanel17.setLayout(jPanel17Layout);
        jPanel17Layout.setHorizontalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel17Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jB_nuevoMS)
                .addGap(30, 30, 30)
                .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(569, Short.MAX_VALUE))
        );
        jPanel17Layout.setVerticalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel17Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel17Layout.createSequentialGroup()
                        .addComponent(jB_nuevoMS)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Mapa de Seguridad", jPanel8);

        jPanel19.setBackground(new java.awt.Color(255, 255, 255));

        jB_nuevoML.setText("Nuevo ML");
        jB_nuevoML.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_nuevoMLActionPerformed(evt);
            }
        });

        jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel17.setText("Mapas de Lubricacion Existentes");

        jT_archivosML.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Nombre"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane4.setViewportView(jT_archivosML);

        jButton10.setText("Abrir");

        jButton11.setText("Cargar");
        jButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton11ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel20Layout.createSequentialGroup()
                        .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel20Layout.createSequentialGroup()
                                .addGap(154, 154, 154)
                                .addComponent(jButton11)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton10))
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 5, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(jLabel17)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton11)
                    .addComponent(jButton10))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
        jPanel19.setLayout(jPanel19Layout);
        jPanel19Layout.setHorizontalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jB_nuevoML)
                .addGap(18, 18, 18)
                .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(596, Short.MAX_VALUE))
        );
        jPanel19Layout.setVerticalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jB_nuevoML)
                    .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(14, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Mapa de Lubricacion", jPanel9);

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1028, Short.MAX_VALUE)
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 251, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Refacciones", jPanel10);

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1028, Short.MAX_VALUE)
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 251, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Historial de Fallos", jPanel11);

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1028, Short.MAX_VALUE)
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 251, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Prop. del Equipo", jPanel12);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 279, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    
    public void cargaDefaultEnca(){
        System.out.println(ServerBridge.getfechasistema());
        System.out.println(ServerBridge.getfechasistemacompleta());
        String arr[] = ServerBridge.getfechasistemacompleta().split("\\/");
        System.out.println(String.valueOf(Integer.parseInt(arr[1]))+"  "+arr[2]);
        cambiaEncabezados(String.valueOf(Integer.parseInt(arr[1])-1),arr[2]);
        jComboLIL_MES.setSelectedIndex(Integer.parseInt(arr[1])-1);
        jCombo_LILAÑO.setSelectedItem(arr[2]);
        //cambiaEncabezados(String.valueOf(jComboLIL_MES.getSelectedIndex()),String.valueOf(jCombo_LILAÑO.getSelectedItem()));
        
    }
    
    private void jB_saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_saveActionPerformed
        String query = "select uniclave from maquinas where uniclave='" + jTm_uniclave.getText() + "'";
        String res = objCon.consultar(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        String arr[] = res.split(",");
        if (arr[0].equals("") || arr[0].equals("null")) {
            addmaquina();
        } else {
            JOptionPane.showMessageDialog(this, "La clave ya esta dada de alta es necesario ingresar otra");
        }// TODO add your handling code here:
    }//GEN-LAST:event_jB_saveActionPerformed

    public String idmaquina(String dato) {
        String query = "select idmaquinas from maquinas where nombre_compuesto='" + dato + "'";
        //System.out.println(query);
        String tipo = objCon.consultar(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        String[] dat = tipo.split(",");
        //System.out.println(query);
        //System.out.println("VALOR DEL ID MAQUINA " + query);
        if (dat[0].equals("") || dat[0].equals("null")) {
            return "sn";
        } else {
            //System.out.println("el que va a la ventana de venta" + dat[0]);
            return (String.valueOf(dat[0]));
        }
    }

    private void llenarCombomaquinas() {
        String query = "select nombre_compuesto from maquinas where status='A' and id_usuario='" + idusuario() + "' order by nombre";
        String res = objCon.consultar(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        
        if (res.length() > 0) {
            String arr[] = res.split(",");
            jC_maquinas.setModel(new javax.swing.DefaultComboBoxModel(arr));

        } else //this.dispose();
        //new configura().setVisible(true);
        //JOptionPane.showMessageDialog(null,"Error de conectividad");
        {

            jC_maquinas.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Agregue algun campo"}));
        }

        //jCusuarios.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Agregue algun campo"}));
    }

    private void llenarCombomaquinasFiltroLIL() {
        String query = "select nombre_compuesto from maquinas where status='A' and id_usuario='" + idusuario() + "' order by nombre";
        String res = objCon.consultar(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        if (res.length() > 0) {
            String arr[] = res.split(",");
            jC_maquinasfiltro.setModel(new javax.swing.DefaultComboBoxModel(arr));

        } else //this.dispose();
        //new configura().setVisible(true);
        //JOptionPane.showMessageDialog(null,"Error de conectividad");
        {

            jC_maquinasfiltro.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Agregue algun campo"}));
        }

        //jCusuarios.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Agregue algun campo"}));
    }

    private void lb_fotoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lb_fotoMouseClicked
        JFileChooser se = new JFileChooser();
        se.setFileSelectionMode(JFileChooser.FILES_ONLY);
        int estado = se.showOpenDialog(null);
        if (estado == JFileChooser.APPROVE_OPTION) {
            try {
                fis = new FileInputStream(se.getSelectedFile());
                //System.out.println(fis);
                this.longitudBytes = (int) se.getSelectedFile().length();
                Image icon = ImageIO.read(se.getSelectedFile()).getScaledInstance(lb_foto.getWidth(), lb_foto.getHeight(), Image.SCALE_DEFAULT);
                lb_foto.setIcon(new ImageIcon(icon));
                lb_foto.updateUI();
            } catch (FileNotFoundException ex) {
                ex.printStackTrace();
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        }// TODO add your handling code here:
    }//GEN-LAST:event_lb_fotoMouseClicked

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        if (String.valueOf(jC_maquinas.getSelectedItem()).equals("Agregue algun campo")) {
            JOptionPane.showMessageDialog(this, "Aun no existen maquinas dadas de alta");
        } else {
            ServerBridge.setnombreMaquina(String.valueOf(jC_maquinas.getSelectedItem()));
            ServerBridge.settipoLil("Maquina");
            new FormLil().setVisible(true);
        }// TODO add your handling code here:
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jTable_puntosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable_puntosMouseClicked
        Object seleccion = JOptionPane.showInputDialog(null,
                "Seleccione opcion",
                "Selector de opciones",
                JOptionPane.QUESTION_MESSAGE,
                null, // null para icono defecto
                new Object[]{"Editar", "Desplegar"},
                "opcion 1");// TODO add your handling code here:
    }//GEN-LAST:event_jTable_puntosMouseClicked

    private void jC_categoriaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jC_categoriaItemStateChanged
        cargarDatosentablaporCategoria(idmaquina(String.valueOf(jC_maquinas.getSelectedItem())), String.valueOf(jC_categoria.getSelectedItem()));// TODO add your handling code here:
        //cargarDatosentabla(idmaquina(String.valueOf(jC_maquinas.getSelectedItem())));
        jTable_puntos.setDefaultRenderer(Object.class, new FormatoTablastatuscomisiones());
    }//GEN-LAST:event_jC_categoriaItemStateChanged

    private void jC_frecuenciaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jC_frecuenciaItemStateChanged
        cargarDatosentablaporCategoriayFrecuencia(idmaquina(String.valueOf(jC_maquinas.getSelectedItem())), String.valueOf(jC_categoria.getSelectedItem()), String.valueOf(jC_frecuencia.getSelectedItem()));// TODO add your handling code here:

        // TODO add your handling code here:
    }//GEN-LAST:event_jC_frecuenciaItemStateChanged

    private void jC_prioridadItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jC_prioridadItemStateChanged
        cargarDatosentablaporCategoriayFrecuenciayprioridad(idmaquina(String.valueOf(jC_maquinas.getSelectedItem())),
                String.valueOf(jC_categoria.getSelectedItem()),
                String.valueOf(jC_frecuencia.getSelectedItem()), String.valueOf(jC_prioridad.getSelectedItem()));// TODO add your handling code here:
        // TODO add your handling code here:
    }//GEN-LAST:event_jC_prioridadItemStateChanged

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        DefaultTableModel temp = (DefaultTableModel) jTable_puntos.getModel();
        String cant, des;
        int opc;
        int nc = jTable_puntos.getSelectedRow();
        if (nc != -1) {
            String nombre_componente = String.valueOf(this.jTable_puntos.getValueAt(nc, 0));
            String nombre_maquina = String.valueOf(this.jTable_puntos.getValueAt(nc, 10));
            int numC = nombre_componente.length();
            if (numC < 6) {
                ServerBridge.setnombreMaquina(nombre_maquina);
                ServerBridge.settipoLil("Componente");
                ServerBridge.setnombreComponente(nombre_componente);
                new FormLil().setVisible(true);
            } else {
                String cad = nombre_componente.substring(0, 6);
                if (cad.equals("   SC:")) {
                    JOptionPane.showMessageDialog(this, "No se puede agregar punto a un SubComponente");
                } else {
                    ServerBridge.setnombreMaquina(nombre_maquina);
                    ServerBridge.settipoLil("Componente");
                    ServerBridge.setnombreComponente(nombre_componente);
                    new FormLil().setVisible(true);
                }
            }
        } //JOptionPane.showMessageDialog(null,rclave+""+rdescr+""+rprec);
        else {
            JOptionPane.showMessageDialog(null, "Debes seleccionar un componente");
        }// TODO add your handling code here:
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        String valor = String.valueOf(jC_valLups.getSelectedItem()); // TODO add your handling code here:
        if (valor.equals("Lups AMS Conocimieto General")) {
            try {
                //Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\documents\\Lup´s AMS Conocimeito General.xls");
                Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\Program Files\\AMService\\Archivos_XLS\\Lup´s AMS Conocimeito General.xls");

                System.out.println("entro al proceso");
            } catch (Exception evvv) {
                JOptionPane.showMessageDialog(null, "No se puede abrir el archivo de ayuda, probablemente fue borrado", "ERROR", JOptionPane.ERROR_MESSAGE);
            }
        } else {
            if (valor.equals("Lups AMS Descriptivo")) {
                try {
                    //Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\documents\\Lup´s AMS Conocimeito General.xls");
                    Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\Program Files\\AMService\\Archivos_XLS\\Lup´s AMS Descriptivo.xls");

                    System.out.println("entro al proceso");
                } catch (Exception evvv) {
                    JOptionPane.showMessageDialog(null, "No se puede abrir el archivo de ayuda, probablemente fue borrado", "ERROR", JOptionPane.ERROR_MESSAGE);
                }
            } else {
                if (valor.equals("Lups AMS Saber por que")) {
                    try {
                        //Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\documents\\Lup´s AMS Conocimeito General.xls");
                        Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\Program Files\\AMService\\Archivos_XLS\\Lup´s AMS Saber por qué.xls");

                        System.out.println("entro al proceso");
                    } catch (Exception evvv) {
                        JOptionPane.showMessageDialog(null, "No se puede abrir el archivo de ayuda, probablemente fue borrado", "ERROR", JOptionPane.ERROR_MESSAGE);
                    }
                } else {
                    if (valor.equals("Lups AMS Solución de problemas")) {
                        try {
                            //Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\documents\\Lup´s AMS Conocimeito General.xls");
                            Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\Program Files\\AMService\\Archivos_XLS\\Lup´s AMS Solución de problemas.xls");

                            System.out.println("entro al proceso");
                        } catch (Exception evvv) {
                            JOptionPane.showMessageDialog(null, "No se puede abrir el archivo de ayuda, probablemente fue borrado", "ERROR", JOptionPane.ERROR_MESSAGE);
                        }
                    }
                }
            }
        }



    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        DefaultTableModel temp = (DefaultTableModel) jT_archivos.getModel();
        //JTable jTableproductosdisLocal = new JTable(temp);

        File directorio = new File("C:\\Program Files\\AMService\\files_xls_lups\\");
        String[] listaDirectorio = directorio.list();
        Object[] dt;
        String valor;
        if (listaDirectorio == null) {
            System.out.println("No hay ficheros en el directorio especificado");
        } else {
            limpiatablaArchivoslups();
            for (int y = 0; y < listaDirectorio.length; y++) {
                //System.out.println(listaDirectorio[y]);
                valor = String.valueOf(listaDirectorio[y]);
                Object[] dtfa = {listaDirectorio[y]};
                temp.addRow(dtfa);
            }

        }// TODO add your handling code here:
    }//GEN-LAST:event_jButton5ActionPerformed
    
    private void limpiatablaArchivoslups() {
        DefaultTableModel temp1 = (DefaultTableModel) jT_archivos.getModel();
        for (int i = jT_archivos.getRowCount() - 1; i >= 0; i--) {
            temp1.removeRow(i);
        }
    }
    
    private void limpiatablaArchivosmapaseguridad() {
        DefaultTableModel temp1 = (DefaultTableModel) jT_archivosMapas.getModel();
        for (int i = jT_archivosMapas.getRowCount() - 1; i >= 0; i--) {
            temp1.removeRow(i);
        }
    }
    
    private void limpiatablaArchivosmapalubricacion() {
        DefaultTableModel temp1 = (DefaultTableModel) jT_archivosML.getModel();
        for (int i = jT_archivosML.getRowCount() - 1; i >= 0; i--) {
            temp1.removeRow(i);
        }
    }
    
    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
        DefaultTableModel temp = (DefaultTableModel) jT_archivosMapas.getModel();
        //JTable jTableproductosdisLocal = new JTable(temp);

        File directorio = new File(".//files_xls_mapa_seguridad");
        String[] listaDirectorio = directorio.list();
        Object[] dt;
        String valor;
        if (listaDirectorio == null) {
            System.out.println("No hay ficheros en el directorio especificado");
        } else {
            for (int y = 0; y < listaDirectorio.length; y++) {
                //System.out.println(listaDirectorio[y]);
                valor = String.valueOf(listaDirectorio[y]);
                Object[] dtfa = {listaDirectorio[y]};
                temp.addRow(dtfa);
            }

        }        // TODO add your handling code here:
    }//GEN-LAST:event_jButton8ActionPerformed

    private void jB_nuevoMSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_nuevoMSActionPerformed
        try {
            //Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\documents\\Lup´s AMS Conocimeito General.xls");
            Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\Program Files\\AMService\\Archivos_XLS\\Mapa de seguridad.xls");

            System.out.println("entro al proceso");
        } catch (Exception evvv) {
            JOptionPane.showMessageDialog(null, "No se puede abrir el archivo de ayuda, probablemente fue borrado", "ERROR", JOptionPane.ERROR_MESSAGE);
        }// TODO add your handling code here:
    }//GEN-LAST:event_jB_nuevoMSActionPerformed

    private void jB_nuevoMLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_nuevoMLActionPerformed
        try {
            //Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\documents\\Lup´s AMS Conocimeito General.xls");
            Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\Program Files\\AMService\\Archivos_XLS\\MDL-AMS-007.xls");

            System.out.println("entro al proceso");
        } catch (Exception evvv) {
            JOptionPane.showMessageDialog(null, "No se puede abrir el archivo de ayuda, probablemente fue borrado", "ERROR", JOptionPane.ERROR_MESSAGE);
        }// TODO add your handling code here:
    }//GEN-LAST:event_jB_nuevoMLActionPerformed

    private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
        DefaultTableModel temp = (DefaultTableModel) jT_archivosML.getModel();
        //JTable jTableproductosdisLocal = new JTable(temp);

        File directorio = new File(".//files_xls_mapa_lubricacion");
        String[] listaDirectorio = directorio.list();
        Object[] dt;
        String valor;
        if (listaDirectorio == null) {
            System.out.println("No hay ficheros en el directorio especificado");
        } else {
            for (int y = 0; y < listaDirectorio.length; y++) {
                //System.out.println(listaDirectorio[y]);
                valor = String.valueOf(listaDirectorio[y]);
                Object[] dtfa = {listaDirectorio[y]};
                temp.addRow(dtfa);
            }

        } // TODO add your handling code here:
    }//GEN-LAST:event_jButton11ActionPerformed

    private void jB_exitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_exitActionPerformed
        int i = JOptionPane.showConfirmDialog(this, "Desea salir de maquinas", "Confirmacion", JOptionPane.YES_NO_OPTION);
        if (i == 0) {
            this.dispose();
        }         // TODO add your handling code here:
    }//GEN-LAST:event_jB_exitActionPerformed

    private void jB_deleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_deleteActionPerformed
        if (jTm_nombre.getText().equals("")) {
            JOptionPane.showMessageDialog(this, "Debes seleccionar una maquina para eliminarla");
        } else {
            String query = "select nombre from maquinas where uniclave='" + jTm_uniclave.getText() + "'";
            String res = objCon.consultar(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
            String datos[] = res.split("\\,");
            if (datos[0].equals("") || datos[0].equals("null")) {
                JOptionPane.showMessageDialog(this, "La maquina no existe es necesario buscar otra para eliminarla");
            } else {
                int i = JOptionPane.showConfirmDialog(this, "Se elimnira la maquina \n Desea continuar", "Confirmacion", JOptionPane.YES_NO_OPTION);
                if (i == 0) {
                    eliminaMaquina();
                }
            }
        }
        // TODO add your handling code here:
    }//GEN-LAST:event_jB_deleteActionPerformed

    private void jB_updateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_updateActionPerformed
        updateMaquina();// TODO add your handling code here:
    }//GEN-LAST:event_jB_updateActionPerformed

    private void jC_maquinasfiltroItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jC_maquinasfiltroItemStateChanged
        if (evt.getStateChange() == ItemEvent.SELECTED) {
            cargaDatosMaquinaLILDes(String.valueOf(jC_maquinasfiltro.getSelectedItem()));
        }


    }//GEN-LAST:event_jC_maquinasfiltroItemStateChanged

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
        
        
        
    }//GEN-LAST:event_jButton9ActionPerformed
       
    public String regresaFechatratada(int sumaDias){
                SimpleDateFormat formato = new SimpleDateFormat("dd/MM/yyyy");
                Calendar c1 = Calendar.getInstance(); 
                c1.add(Calendar.DATE,sumaDias); //le suma 25 días
                //System.out.println("La fecha de hoy más 25 días es : " +
                //formato.format(c1.getTime()));
          return formato.format(c1.getTime());
    }
        
    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
        cambiaEncabezados(String.valueOf(jComboLIL_MES.getSelectedIndex()),String.valueOf(jCombo_LILAÑO.getSelectedItem()));
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton6ActionPerformed

    private void jB_abrelupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_abrelupActionPerformed
        DefaultTableModel temp = (DefaultTableModel) jT_archivos.getModel();
        String cant, des;
        int opc;
        int nc = jT_archivos.getSelectedRow();
        if (nc != -1) {
            String archivo = String.valueOf(this.jT_archivos.getValueAt(nc, 0));
            try {
                //Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\documents\\Lup´s AMS Conocimeito General.xls");
                Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\\Program Files\\AMService\\files_xls_lups\\"+archivo+"");

                //System.out.println("entro al proceso");
            } catch (Exception evvv) {
                JOptionPane.showMessageDialog(null, "No se puede abrir el archivo de ayuda, probablemente fue borrado", "ERROR", JOptionPane.ERROR_MESSAGE);
            }
            
            
        } //JOptionPane.showMessageDialog(null,rclave+""+rdescr+""+rprec);
        else {
            JOptionPane.showMessageDialog(null, "Debes seleccionar un archivo para abrir");
        }
         // TODO add your handling code here:
    }//GEN-LAST:event_jB_abrelupActionPerformed

    private void jC_maquinasItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jC_maquinasItemStateChanged
        cargaDatosMaquina(String.valueOf(jC_maquinas.getSelectedItem()));
        cargarDatosentabla(idmaquina(String.valueOf(jC_maquinas.getSelectedItem())));
        jTable_puntos.setDefaultRenderer(Object.class, new FormatoTablastatuscomisiones());
// TODO add your handling code here:
    }//GEN-LAST:event_jC_maquinasItemStateChanged

    public void implementa() {
        JTableHeader th = jTableLILDesglose.getTableHeader();
        TableColumnModel tcm = th.getColumnModel();
        TableColumn tc = tcm.getColumn(0); //recordemos que las columnas inician a enumerarse desde cero
        tc.setHeaderValue("Cadena Nueva");
        th.repaint(); //actualizamos el header
    }

    public void cambiaEncabezados(String mes,String año) {
        JTableHeader th = jTableLILDesglose.getTableHeader();
        TableColumnModel tcm = th.getColumnModel();
        System.out.println("VALORES AÑO Y MES "+ mes +" "+año);
        String datos[] = 
                String.valueOf(getPrimerDiaDelMes(Integer.parseInt(mes),Integer.parseInt(año))).split("\\s");
                /*String.valueOf(
                getPrimerDiaDelMes(
                Integer.parseInt(String.valueOf(jComboLIL_MES.getSelectedIndex())),
                Integer.parseInt(String.valueOf(jCombo_LILAÑO.getSelectedItem())))).split("\\s");*/
        System.out.println(String.valueOf(jComboLIL_MES.getSelectedIndex()));
        System.out.println(String.valueOf(jCombo_LILAÑO.getSelectedItem()));
        String datos1[] = ServerBridge.getfechasistemacompleta().split("\\/");
        int vMes = Integer.parseInt(datos1[1]);
        int vAño = Integer.parseInt(datos1[2]);
        int vAño1=Integer.parseInt(año);
        int vMes1=Integer.parseInt(mes);
        int vDias = (diasDelMes(vAño1, vMes1));
        //System.out.println("PRIMER DIA DEL MES QUE ENTRA AL METODO:"+datos[0]);
        String[] valor=RegresaDia(datos[0],vDias);
        System.out.println("valor de arreglo: "+valor.length);
        for (int x = 2; x < vDias + 2; x++) {
            TableColumn tc = tcm.getColumn(x);
            tc.setHeaderValue(valor[x-2]+" "+(x - 1));
            th.repaint();
        }
    }
    
    
    
    public String[] RegresaDia(String dato,int nDmes) {
        int vD;
        int vD1=0;
        String[] valorDias=new String[nDmes];
        String[] nvmes={"Mon",
            "Tue",
            "Wed",
            "Thu",
            "Fri",
            "Sat",
            "Sun",
            "Mon",
            "Tue",
            "Wed",
            "Thu",
            "Fri",
            "Sat",
            "Sun",
            "Mon",
            "Tue",
            "Wed",
            "Thu",
            "Fri",
            "Sat",
            "Sun",
            "Mon",
            "Tue",
            "Wed",
            "Thu",
            "Fri",
            "Sat",
            "Sun",
            "Mon",
            "Tue",
            "Wed",
            "Thu",
            "Fri",
            "Sat",
            "Sun",
            "Mon",
            "Tue",
            "Wed",
            "Thu",
            "Fri",
            "Sat",
            "Sun"};
        String[] nvmesEspañol={"Lun",
            "Mar",
            "Mie",
            "Jue",
            "Vie",
            "Sab",
            "Dom",
            "Lun",
            "Mar",
            "Mie",
            "Jue",
            "Vie",
            "Sab",
            "Dom",
           "Lun",
            "Mar",
            "Mie",
            "Jue",
            "Vie",
            "Sab",
            "Dom",
            "Lun",
            "Mar",
            "Mie",
            "Jue",
            "Vie",
            "Sab",
            "Dom",
            "Lun",
            "Mar",
            "Mie",
            "Jue",
            "Vie",
            "Sab",
            "Dom",
            "Lun",
            "Mar",
            "Mie",
            "Jue",
            "Vie",
            "Sab",
            "Dom"};
        for(int x=1;x<7;x++){
         if(nvmes[x].equals(dato)){
             vD1=x;
         }
        }
        int nD=1;
        for(int y=vD1;y<nDmes+vD1;y++){
            System.out.println("EL DIA "+ nD +" ES :"+nvmes[y]);
            valorDias[nD-1]=nvmesEspañol[y];
            nD++;
        }
        
        System.out.println("NUMERO DE VALOR:"+vD1);
        int[] nvval={1,2,3,4,5,6,7};
        if (dato.equals("Mon")) {
            vD = 1;
        } else {
            if (dato.equals("Tue")) {
                vD = 2;
            } else {
                if (dato.equals("Wed")) {
                    vD = 3;
                } else {
                    if (dato.equals("Thu")) {
                        vD = 4;
                    } else {
                        if (dato.equals("Fri")) {
                            vD = 5;
                        } else {
                            if (dato.equals("Sat")) {
                                vD = 6;
                            } else {
                                if (dato.equals("Sun")) {
                                    vD = 7;
                                } else {
                                    vD = 8;
                                }
                            }
                        }
                    }
                }
            }
        }
        
        for(int x=0;x<nDmes;x++){
        
        }
        
        return valorDias;
    }

    public static Date getPrimerDiaDelMes(int mes,int año) {
        System.out.println("MES "+mes);
        System.out.println("AÑO "+año);
        Calendar cal = Calendar.getInstance();
        Calendar cal1 = GregorianCalendar.getInstance();
        cal1.set(año, mes,1); // Febrero 2006, los meses empiezan en 0.
        /*System.out.println("Último día: " + cal1.getActualMaximum(GregorianCalendar.DAY_OF_MONTH));
        System.out.println("Primer dia: " + cal1.getActualMinimum(Calendar.DAY_OF_MONTH));
        System.out.println("DIA: "+ cal1.getTime());*/
        cal.set(cal.get(Calendar.YEAR),
                cal.get(Calendar.MONTH),
                cal.getActualMinimum(Calendar.DAY_OF_MONTH),
                cal.getMinimum(Calendar.HOUR_OF_DAY),
                cal.getMinimum(Calendar.MINUTE),
                cal.getMinimum(Calendar.SECOND));
        return cal1.getTime();

    }

    public void cargaDatosMaquinaLILDes(String dato) {
        DefaultTableModel temp1 = (DefaultTableModel) jTableLILDesglose.getModel();
        String query = "select am_lil.componente,"
                + "am_lil.prioridad,maquinas.nombre_compuesto,am_lil.punto from maquinas,am_lil where am_lil.idmaquina='" + idmaquina(dato) + "' and maquinas.idmaquinas='" + idmaquina(dato) + "'";
        System.out.println(query);
        String res = objCon.consultarB(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        String datos[] = res.split("\\¬");
        //System.out.println(res);
        if (datos[0].equals("") || datos[0].equals("null")) {
            limpiatablalil();
        } else {
            limpiatablalil();
            for (int x = 0; x < datos.length - 1; x = x + 4) {
                Object[] dtfa = {datos[x], datos[x + 1]};
                temp1.addRow(dtfa);
                //System.out.println("esto entra a los datos de los componentes:");
                //System.out.println("ID MAQUINA: " + idcomponete(idmaquina(dato), datos[x + 3]) + " DATO " + dato + " DATOS 2 " + datos[x + 2]);
                cargarDatosdePrimerPuntoLILDes(idcomponete(idmaquina(dato), datos[x + 3]), idmaquina(dato), datos[x + 2]);

            }
        }
        cargaFrecuencia(String.valueOf(jComboLIL_MES.getSelectedIndex()),String.valueOf(jCombo_LILAÑO.getSelectedItem()));
    }
    
    public void cargaFrecuencia(String mes,String año){
        DefaultTableModel temp1 = (DefaultTableModel) jTableLILDesglose.getModel();
        DefaultTableCellRenderer tcr = new DefaultTableCellRenderer();
        tcr.setHorizontalAlignment(SwingConstants.CENTER);
        int vAño1=Integer.parseInt(año);
        int vMes1=Integer.parseInt(mes);
        int vDias = (diasDelMes(vAño1, vMes1));
        String query;
        String res;
        String datos[];
        for(int x=0;x<temp1.getRowCount();x++){
            String nombre_componente = String.valueOf(this.jTableLILDesglose.getValueAt(x, 0));
            int numC = nombre_componente.length();
            if (numC < 6) {
             query = "select frecuencia from am_lil where "
                     + "idmaquina='"+idmaquina(String.valueOf(jC_maquinasfiltro.getSelectedItem())) +"' "
                     + "and componente='"+nombre_componente+"'";
                
             res = objCon.consultar(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
             datos = res.split("\\,");
             if(datos[0].equals("D = Diario")){
                   for(int y=2;y<vDias+2;y++){
                       this.jTableLILDesglose.setValueAt("D", x,y);
                       jTableLILDesglose.getColumnModel().getColumn(y).setCellRenderer(tcr);
                       
                   } 
             }else{}
             System.out.println(datos[0]);
            } else {
                String cad = nombre_componente.substring(0, 6);
                if (cad.equals("   SC:")) {
                    
                } else {
                    query = "select frecuencia from am_lil where "
                     + "idmaquina='"+idmaquina(String.valueOf(jC_maquinasfiltro.getSelectedItem())) +"' "
                     + "and componente='"+nombre_componente+"'";
                    res = objCon.consultar(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
                    datos = res.split("\\,"); 
                    System.out.println(datos[0]);
                    if(datos[0].equals("D = Diario")){
                    for(int y=2;y<vDias+2;y++){
                       this.jTableLILDesglose.setValueAt("D", x,y);
                       jTableLILDesglose.getColumnModel().getColumn(y).setCellRenderer(tcr);
                       
                   } 
             }else{}
                }
            }
        }
    }
    
    public void updateMaquina() {
        String idmaq = idmaquina(String.valueOf(jC_maquinas.getSelectedItem()));
        String idusu = idusuario(ServerBridge.getidentificadorUsuario());
        String queUp = "update maquinas set nombre='" + jTm_nombre.getText() + "',"
                + "marca='" + jTm_marca.getText() + "',"
                + "serie='" + jTm_serie.getText() + "',"
                + "modelo='" + jTm_modelo.getText() + "',"
                + "ubicacion='" + String.valueOf(jCm_ubicacion.getSelectedItem()) + "',"
                + "fecha='" + fechaInsert(jFm_fechaingreso.getText()) + "',"
                + "nombre_compuesto='" + (jTm_nombre.getText() + " / " + jTm_modelo.getText() + " / " + jTm_marca.getText()) + "' where idmaquinas='" + idmaq + "' and id_usuario='" + idusu + "'";
        String res = objCon.modificar(queUp, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        if (res.equals("Exito!")) {
            JOptionPane.showMessageDialog(this, "Se actualizo correcatamente la maquina");
            llenarCombomaquinas();
            LimpiaDatos();
            limpiatabla();
            lb_foto.setIcon(new CustomImageIcon(getClass().getResource("/resource/defaultlarge.gif")));
        } else {
            JOptionPane.showMessageDialog(this, "Ocurrio un error al dar de baja la maquina");
        }
    }

    public void eliminaMaquina() {
        String idmaq = idmaquina(String.valueOf(jC_maquinas.getSelectedItem()));
        String idusu = idusuario(ServerBridge.getidentificadorUsuario());
        String queUp = "update maquinas set status='D' where idmaquinas='" + idmaq + "' and id_usuario='" + idusu + "'";
        String res = objCon.modificar(queUp, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        if (res.equals("Exito!")) {
            JOptionPane.showMessageDialog(this, "Se dio de baja correcatamente la maquina");
            llenarCombomaquinas();
            LimpiaDatos();
            limpiatabla();
        } else {
            JOptionPane.showMessageDialog(this, "Ocurrio un error al dar de baja la maquina");
        }


    }

    public void cargarDatosentablaporCategoriayFrecuenciayprioridad(String dato, String categoria, String frecuencia, String prioridad) {
        DefaultTableModel temp1 = (DefaultTableModel) jTable_puntos.getModel();
        if (categoria.equals("General")) {
            cargarDatosentabla(idmaquina(String.valueOf(jC_maquinas.getSelectedItem())));
        } else {
            String query = "select maquinas.nombre,"
                    + "am_lil.runstop,"
                    + "am_lil.punto,"
                    + "am_lil.componente,"
                    + "am_lil.estandar,"
                    + "am_lil.metodo,"
                    + "am_lil.herramientas,"
                    + "am_lil.accion,"
                    + "am_lil.tiempo,"
                    + "am_lil.frecuencia,am_lil.prioridad from maquinas,am_lil where am_lil.idmaquina='" + dato + "' "
                    + "and maquinas.idmaquinas='" + dato + "' and am_lil.categoria='" + categoria + "' "
                    + "and am_lil.frecuencia='" + frecuencia + "' and am_lil.prioridad='" + prioridad + "'";
            //System.out.println(query);
            String res = objCon.consultarB(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
            String datos[] = res.split("\\¬");
            //System.out.println(res);
            if (datos[0].equals("") || datos[0].equals("null")) {
                limpiatabla();
            } else {
                limpiatabla();
                for (int x = 0; x < datos.length - 1; x = x + 11) {
                    Object[] dtfa = {datos[x + 3], datos[x + 1], datos[x + 2], datos[x + 4], Metodo(datos[x + 5]), datos[x + 6],
                        datos[x + 7], datos[x + 8], datos[x + 9], datos[x + 10], datos[x]};
                    temp1.addRow(dtfa);
                    cargarDatosdePrimerPunto(idcomponete(dato, datos[x + 2]), dato, datos[x]);

                }
            }
        }
    }

    public void cargarDatosentablaporCategoriayFrecuencia(String dato, String categoria, String frecuencia) {
        DefaultTableModel temp1 = (DefaultTableModel) jTable_puntos.getModel();
        if (categoria.equals("General")) {
            cargarDatosentabla(idmaquina(String.valueOf(jC_maquinas.getSelectedItem())));
        } else {
            String query = "select maquinas.nombre,"
                    + "am_lil.runstop,"
                    + "am_lil.punto,"
                    + "am_lil.componente,"
                    + "am_lil.estandar,"
                    + "am_lil.metodo,"
                    + "am_lil.herramientas,"
                    + "am_lil.accion,"
                    + "am_lil.tiempo,"
                    + "am_lil.frecuencia,am_lil.prioridad from maquinas,am_lil where am_lil.idmaquina='" + dato + "' "
                    + "and maquinas.idmaquinas='" + dato + "' and am_lil.categoria='" + categoria + "' and am_lil.frecuencia='" + frecuencia + "'";
            //System.out.println(query);
            String res = objCon.consultarB(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
            String datos[] = res.split("\\¬");
            //System.out.println(res);
            if (datos[0].equals("") || datos[0].equals("null")) {
                limpiatabla();
            } else {
                limpiatabla();
                for (int x = 0; x < datos.length - 1; x = x + 11) {
                    Object[] dtfa = {datos[x + 3], datos[x + 1], datos[x + 2], datos[x + 4], Metodo(datos[x + 5]), datos[x + 6],
                        datos[x + 7], datos[x + 8], datos[x + 9], datos[x + 10], datos[x]};
                    temp1.addRow(dtfa);
                    cargarDatosdePrimerPunto(idcomponete(dato, datos[x + 2]), dato, datos[x]);

                }
            }
        }
    }

    public void cargarDatosentablaporCategoria(String dato, String categoria) {
        DefaultTableModel temp1 = (DefaultTableModel) jTable_puntos.getModel();
        if (categoria.equals("General")) {
            cargarDatosentabla(idmaquina(String.valueOf(jC_maquinas.getSelectedItem())));
        } else {
            String query = "select "
                    + "maquinas.nombre,"
                    + "am_lil.runstop,"
                    + "am_lil.punto,"
                    + "am_lil.componente,"
                    + "am_lil.estandar,"
                    + "am_lil.metodo,"
                    + "am_lil.herramientas,"
                    + "am_lil.accion,"
                    + "am_lil.tiempo,"
                    + "am_lil.frecuencia,am_lil.prioridad from maquinas,am_lil where am_lil.idmaquina='" + dato + "' and maquinas.idmaquinas='" + dato + "' and am_lil.categoria='" + categoria + "'";
            //System.out.println(query);
            String res = objCon.consultarB(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
            String datos[] = res.split("\\¬");
            //System.out.println(res);
            if (datos[0].equals("") || datos[0].equals("null")) {
                limpiatabla();
            } else {
                limpiatabla();
                for (int x = 0; x < datos.length - 1; x = x + 11) {
                    /*
                     * Object[] dtfa = {datos[x], datos[x + 1], datos[x + 2],
                     * datos[x + 3], datos[x + 4], Metodo(datos[x + 5]), datos[x
                     * + 6], datos[x + 7], datos[x + 8], datos[x + 9], datos[x +
                     * 10]};
                     */
                    Object[] dtfa = {datos[x + 3], datos[x + 1], datos[x + 2], datos[x + 4], Metodo(datos[x + 5]), datos[x + 6],
                        datos[x + 7], datos[x + 8], datos[x + 9], datos[x + 10], datos[x]};
                    temp1.addRow(dtfa);
                    cargarDatosdePrimerPunto(idcomponete(dato, datos[x + 2]), dato, datos[x]);

                }
            }
        }
    }

    public void cargarDatosentabla(String dato) {
        DefaultTableModel temp1 = (DefaultTableModel) jTable_puntos.getModel();
        String query = "select maquinas.nombre,"
                + "am_lil.runstop,"
                + "am_lil.punto,"
                + "am_lil.componente,"
                + "am_lil.estandar,"
                + "am_lil.metodo,"
                + "am_lil.herramientas,"
                + "am_lil.accion,"
                + "am_lil.tiempo,"
                + "am_lil.frecuencia,am_lil.prioridad,maquinas.nombre_compuesto from maquinas,am_lil where am_lil.idmaquina='" + dato + "' and maquinas.idmaquinas='" + dato + "'";
        System.out.println(query);
        String res = objCon.consultarB(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        String datos[] = res.split("\\¬");
        //System.out.println(res);
        if (datos[0].equals("") || datos[0].equals("null")) {
            limpiatabla();
        } else {
            limpiatabla();
            for (int x = 0; x < datos.length - 1; x = x + 12) {
                Object[] dtfa = {datos[x + 3], datos[x + 1], datos[x + 2], datos[x + 4], Metodo(datos[x + 5]), datos[x + 6],
                    datos[x + 7], datos[x + 8], datos[x + 9], datos[x + 10], datos[x + 11]};
                temp1.addRow(dtfa);
                cargarDatosdePrimerPunto(idcomponete(dato, datos[x + 2]), dato, datos[x + 11]);

            }
        }

    }

    public String idcomponete(String idmaquina, String punto) {
        String query = "select idam_lil from am_lil where idmaquina='" + idmaquina + "' and punto='" + punto + "'";
        String res = objCon.consultarB(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        String datos[] = res.split("\\¬");
        String regreso;
        System.out.println("query id componente " + query);
        System.out.println(datos[0]);
        if (datos[0].equals("") || datos[0].equals("null")) {
            regreso = "";
        } else {
            regreso = datos[0];
        }
        return regreso;
    }

    public void cargarDatosdePrimerPuntoLILDes(String idcomponente, String idmaquina, String maquina) {
        DefaultTableModel temp1 = (DefaultTableModel) jTableLILDesglose.getModel();
        String query = "select am_lil_punto.componente,"
                + "am_lil_punto.prioridad "
                + "from am_lil,am_lil_punto where "
                + "am_lil_punto.idcomponente='" + idcomponente + "' "
                + "and am_lil.punto=am_lil_punto.idcomponente "
                + "and am_lil.idmaquina='" + idmaquina + "';";
        //System.out.println("QUE QUERY ES ESTE ------> " + query);
        String res = objCon.consultarB(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        String datos[] = res.split("\\¬");
        //System.out.println(res);
        if (datos[0].equals("") || datos[0].equals("null")) {
            //limpiatabla();
        } else {
            //limpiatabla();
            for (int x = 0; x < datos.length - 1; x = x + 2) {
                Object[] dtfa = {"   SC:" + datos[x], datos[x + 1]};
                temp1.addRow(dtfa);

            }
        }

    }

    public int diasDelMes(int anio, int mesBase0) {
        int dias = 31;
        Calendar c = Calendar.getInstance();
        
        c.set(anio, mesBase0, dias);
        while (c.get(Calendar.MONTH) != mesBase0) {
            c.set(anio, mesBase0, --dias);
        }
        System.out.println("MES:"+mesBase0+" AÑO:"+anio);
        System.out.println("DIAS DEL MES "+dias);
        return dias;
    }

    public void cargarDatosdePrimerPunto(String idcomponente, String idmaquina, String maquina) {
        DefaultTableModel temp1 = (DefaultTableModel) jTable_puntos.getModel();
        String query = "select am_lil.componente,"
                + "am_lil_punto.runstop,"
                + "am_lil_punto.punto,"
                + "am_lil_punto.componente,"
                + "am_lil_punto.estandar,"
                + "am_lil_punto.metodo,"
                + "am_lil_punto.herramientas,"
                + "am_lil_punto.accion,"
                + "am_lil_punto.tiempo,"
                + "am_lil_punto.frecuencia,"
                + "am_lil_punto.prioridad "
                + "from am_lil,am_lil_punto where "
                + "am_lil_punto.idcomponente='" + idcomponente + "' "
                + "and am_lil.punto=am_lil_punto.idcomponente "
                + "and am_lil.idmaquina='" + idmaquina + "';";
        System.out.println("ESTE ES EL QUERY" + query);
        String res = objCon.consultarB(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        String datos[] = res.split("\\¬");
        //System.out.println(res);
        if (datos[0].equals("") || datos[0].equals("null")) {
            //limpiatabla();
        } else {
            //limpiatabla();
            for (int x = 0; x < datos.length - 1; x = x + 11) {
                System.out.println("RESULTADO: " + datos[x] + "" + datos[x + 1] + ""
                        + datos[x + 2] + "" + datos[x + 3] + "" + datos[x + 4] + "" + Metodo(datos[x + 5]) + "" + datos[x + 6]
                        + "" + datos[x + 7] + "" + datos[x + 8] + "" + datos[x + 9] + "" + datos[x + 10]);
                Object[] dtfa = {"   SC:" + datos[x + 3], datos[x + 1], datos[x + 2], datos[x + 4], Metodo(datos[x + 5]), datos[x + 6],
                    datos[x + 7], datos[x + 8], datos[x + 9], datos[x + 10], maquina};
                temp1.addRow(dtfa);

            }
        }

    }

    public String Metodo(String dato) {
        String datos[] = dato.split("\\@");
        String finMet = "";
        //System.out.println(dato);
        if (datos[0].equals("01")) {
            finMet = finMet + " / Auditivo";
        }
        if (datos[1].equals("01")) {
            finMet = finMet + " / Manual";
        }
        if (datos[2].equals("01")) {
            finMet = finMet + " / Olfato";
        }
        if (datos[3].equals("01")) {
            finMet = finMet + " / Visual";
        }
        return finMet;

    }

    private void limpiatabla() {
        DefaultTableModel temp1 = (DefaultTableModel) jTable_puntos.getModel();
        for (int i = jTable_puntos.getRowCount() - 1; i >= 0; i--) {
            temp1.removeRow(i);
        }
    }

    private void limpiatablalil() {
        DefaultTableModel temp1 = (DefaultTableModel) jTableLILDesglose.getModel();
        for (int i = jTableLILDesglose.getRowCount() - 1; i >= 0; i--) {
            temp1.removeRow(i);
        }
    }

    public void cargaDatosMaquina(String dato) {
        String query = "select nombre,marca,serie,modelo,ubicacion,fecha,uniclave from "
                + "maquinas where nombre_compuesto='" + dato + "'";
        String res = objCon.consultar(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        String datos[] = res.split("\\,");
        if (datos[0].equals("") || datos[0].equals("null")) {
            JOptionPane.showMessageDialog(this, "No hay datos verifica estructura");
        } else {
            //System.out.println(datos[5]);
            jTm_nombre.setText(datos[0]);
            jTm_marca.setText(datos[1]);
            jTm_serie.setText(datos[2]);
            jTm_modelo.setText(datos[3]);
            jCm_ubicacion.setSelectedItem(datos[4]);
            jFm_fechaingreso.setText(trataFecha(datos[5]));
            jTm_uniclave.setText(datos[6]);
            CustomImageIcon foto = ConexionBaseMa.getFoto(datos[6]);
            ImageIcon fot = ConexionBaseMa.getFoto(datos[6]);
            //System.out.println(foto);
            if (fot != null) {
                Icon icono = new ImageIcon(fot.getImage().getScaledInstance(lb_foto.getWidth(), lb_foto.getHeight(), Image.SCALE_DEFAULT));

                lb_foto.setIcon(icono);
            } else {

                lb_foto.setIcon(new CustomImageIcon(getClass().getResource("/resource/defaultlarge.gif")));
            }
            lb_foto.updateUI();

        }

    }

    public String trataFecha(String dato) {
        String datos[] = dato.split("\\s");
        String dat[] = datos[0].split("\\-");
        return dat[2] + "/" + dat[1] + "/" + dat[0];
    }

    public void addmaquina() {
        if (jTm_nombre.getText().equals("") || jTm_marca.getText().equals("")
                || jTm_serie.getText().equals("") || jTm_modelo.getText().equals("")
                || jFm_fechaingreso.getText().equals("  /  /    ")) {
            JOptionPane.showMessageDialog(this, "Es necesario ingresar todos los campos");
        } else {
            Addmaquinabd();
            LimpiaDatos();
            llenarCombomaquinas();
            lb_foto.setIcon(new CustomImageIcon(getClass().getResource("/resource/defaultlarge.gif")));
        }
    }

    public void LimpiaDatos() {
        jTm_marca.setText("");
        jTm_modelo.setText("");
        jTm_nombre.setText("");
        jTm_serie.setText("");
        jTm_uniclave.setText("AM_" + objDatos.getCadenaAlfanumAleatoria(8));
        jCm_ubicacion.setSelectedIndex(0);
        jFm_fechaingreso.setText(ServerBridge.getfechasistemacompleta());

    }

    public String fechaInsert(String dato) {
        String datos[] = dato.split("\\/");
        return (datos[2] + "-" + datos[1] + "-" + datos[0] + " 12:00:000");
    }

    public String idusuario() {
        String query = "select idusuarios from usuarios where cveusuario='" + ServerBridge.getidentificadorUsuario() + "'";
        String res = objCon.consultar(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        String datos[] = res.split("\\,");
        if (datos[0].equals("") || datos[0].equals("null")) {
            JOptionPane.showMessageDialog(this, "No hay datos verifica estructura");
            return "1";
        } else {
            return datos[0];
        }

    }

    public String idusuario(String dato) {
        String query = "select idusuarios from usuarios where cveusuario='" + dato + "'";
        String res = objCon.consultar(query, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        String datos[] = res.split("\\,");
        if (datos[0].equals("") || datos[0].equals("null")) {
            JOptionPane.showMessageDialog(this, "No hay datos verifica estructura");
            return "1";
        } else {
            return datos[0];
        }

    }

    public void Addmaquinabd() {
        String queryAdd = "insert into maquinas(nombre,marca,serie,modelo,ubicacion,"
                + "fecha,uniclave,observaciones,status,nombre_compuesto,id_usuario) values("
                + "'" + jTm_nombre.getText() + "',"
                + "'" + jTm_marca.getText() + "',"
                + "'" + jTm_serie.getText() + "',"
                + "'" + jTm_modelo.getText() + "',"
                + "'" + String.valueOf(jCm_ubicacion.getSelectedItem()) + "',"
                + "'" + fechaInsert(jFm_fechaingreso.getText()) + "',"
                + "'" + jTm_uniclave.getText() + "','SIN OBSERVACIONES','A','" + (jTm_nombre.getText() + " / " + jTm_modelo.getText() + " / " + jTm_marca.getText()) + "'," + idusuario() + ")";
        //System.out.println(queryAdd);
        String res = objCon.insertar(queryAdd, ServerBridge.getusuBD(), ServerBridge.getpasBD());
        if (res.equals("Exito!")) {
            Maquina cl1 = new Maquina();
            cl1.setNombre(jTm_uniclave.getText());
            cl1.setFoto(fis);

            //System.out.println(fis);
            //System.out.println(cl);
            //System.out.println(ControllerMaquina.class);
            //System.out.println(cl1);
            int opcion = cc1.insertMaquina(cl1);
            //System.out.println(opcion);
            if (opcion != 0) {
                try {
                    //JOptionPane.showMessageDialog(this, "Registro "+cl+" agregado");
                    //System.out.println("Registro "+cl1+" Agregado");
                    if (fis != null) {
                        fis.close();
                    }
                    fis = null;
                } catch (IOException ex) {
                    Logger.getLogger(InterMaquinas.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            JOptionPane.showMessageDialog(this, "Se agrego la maquina exitosamente");
        } else {
            JOptionPane.showMessageDialog(this, "Ocurrio un error: " + res);
        }


    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jB_abrelup;
    private javax.swing.JButton jB_clean;
    private javax.swing.JButton jB_delete;
    private javax.swing.JButton jB_exit;
    private javax.swing.JButton jB_nuevoML;
    private javax.swing.JButton jB_nuevoMS;
    private javax.swing.JButton jB_save;
    private javax.swing.JButton jB_update;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JComboBox jC_categoria;
    private javax.swing.JComboBox jC_filtrolil;
    private javax.swing.JComboBox jC_frecuencia;
    private javax.swing.JComboBox jC_maquinas;
    private javax.swing.JComboBox jC_maquinasfiltro;
    private javax.swing.JComboBox jC_prioridad;
    private javax.swing.JComboBox jC_valLups;
    private javax.swing.JComboBox jCm_ubicacion;
    private javax.swing.JComboBox jComboLIL_MES;
    private javax.swing.JComboBox jCombo_LILAÑO;
    private javax.swing.JFormattedTextField jFm_fechaingreso;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JTable jT_archivos;
    private javax.swing.JTable jT_archivosML;
    private javax.swing.JTable jT_archivosMapas;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable jTableLILDesglose;
    private javax.swing.JTable jTable_puntos;
    private javax.swing.JTextField jTm_marca;
    private javax.swing.JTextField jTm_modelo;
    private javax.swing.JTextField jTm_nombre;
    private javax.swing.JTextField jTm_serie;
    private javax.swing.JTextField jTm_uniclave;
    private javax.swing.JLabel lb_foto;
    // End of variables declaration//GEN-END:variables
}
